package com.zhai.boot.async.log;

import com.zhai.boot.util.DateUtil;

/**
 * @author Created by 翟凤玺
 * @package com.zhai.boot.async.log
 * @project-name zhai-boot
 * @description 业务日志 工具
 * @create-datetime 2019-9-19 16:35
 */
public class BizLogUtil {
    /**
     * F 表示前缀 A 表示后缀 F: front A: after
     * 每个集合建议维持在百万数据以内（无索引）
     */
    public static final String FMT_YEAR_F = "yyyy_";
    public static final String FMT_YEAR_A = "_yyyy";
    public static final String FMT_MONTH_F = "yyyy_MM_";
    public static final String FMT_MONTH_A = "_yyyy_MM";
    public static final String FMT_DAY_F = "yyyy_MM_dd_";
    public static final String FMT_DAY_A = "_yyyy_MM_dd";

    public static String affix(String fmt) {
        return DateUtil.fmtLocalDateTimeToStr(DateUtil.getCurrentLocalDateTime(), fmt);
    }
}